Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: permit default api context config to be used #4671

Merged

Conversation

ndr-brt
Copy link
Member

@ndr-brt ndr-brt commented Dec 12, 2024

What this PR changes/adds

Remove the useDefaultContext attribute from WebServiceSettings, because it's use was not clear and it didn't permit runtimes to start with default configuration.

Why it does that

Briefly state why the change was necessary.

Further notes

  • removed also name because it was used only for logging, and for that contextAlias can be used as well
  • uniformed the defaultPath value in the form of /api/<context_alias>
  • the current design of the definition and use of these configurations is not really lean and it could deserve some more love

Linked Issue(s)

Closes #4669

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

@ndr-brt ndr-brt added enhancement New feature or request refactoring Cleaning up code and dependencies labels Dec 12, 2024
@ndr-brt ndr-brt requested a review from wolf4ood December 12, 2024 16:24
@ndr-brt ndr-brt force-pushed the 4669-enable-use-default-config branch from 231a3ac to e97224e Compare December 12, 2024 16:28
Copy link
Contributor

@jimmarino jimmarino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that the current context configuration is not intuitive, particularly because it involved multiple objects. Having multiple objects under the hood is OK, but there should be an extension SPI that simplifies/hides their use.

@wolf4ood
Copy link
Contributor

wolf4ood commented Dec 13, 2024

Yeah it's a bit convoluted and misleading on who actually adds the port mapping, that can happen in two places. Since now the pattern is to have always a module *ApiConfiguration that make usage of WebServiceSettings that handles the default values when not configured, I would propose to remove the auto-port mapping from config in the JettyConfiguration and always do this using WebServiceSettings with the WebServiceConfigurer

@ndr-brt ndr-brt merged commit dd54469 into eclipse-edc:main Dec 13, 2024
21 checks passed
@ndr-brt ndr-brt deleted the 4669-enable-use-default-config branch December 13, 2024 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactoring Cleaning up code and dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Api contexts without explicit config value throw exception on startup
3 participants